<?php
/**
 * @version			$Id$
 * @author			Richard Asp
 * @package			Joomla
 * @subpackage		gnudoor
 * @copyright		(C) 2010 gnudoor LLC
 * @license      GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.controller');

class GnudoorControllerNewtask extends GnudoorController
{
	function display() {
        JRequest::setVar( 'view', 'newtask' );
		JRequest::setVar( 'layout', 'default');
		parent::display();
    }
    
    function steptwo() {
    	
		switch (JRequest::getVar('provider'))
		{
		case 1:
			JRequest::setVar( 'view', 'newtask' );
			JRequest::setVar( 'layout', 'pickprovider');
		  break;
		case 2:
			JRequest::setVar( 'view', 'appt' );
			JRequest::setVar( 'layout', 'selectservice');
		  break;
		case 3:
			JRequest::setVar( 'view', 'newtask' );
			JRequest::setVar( 'layout', 'step3');
		  break;
		default:
			JRequest::setVar( 'view', 'appt' );
			JRequest::setVar( 'layout', 'selectservice');
		}
    	
		parent::display();		
	}

	function stepthree() {
		JRequest::setVar( 'view', 'newtask' );
		JRequest::setVar( 'layout', 'step3');
		parent::display();		
	}
	
	function stepfour() {
		JRequest::setVar( 'view', 'newtask' );
		JRequest::setVar( 'layout', 'step4');
		parent::display();		
	}
	function stepfive() {
		JRequest::setVar( 'view', 'newtask' );
		JRequest::setVar( 'layout', 'step5');
		parent::display();		
	}
	function stepsix() {
		JRequest::setVar( 'view', 'newtask' );
		JRequest::setVar( 'layout', 'preview');
		parent::display();		
	}
	function thanks() {
		JRequest::setVar( 'view', 'newtask' );
		JRequest::setVar( 'layout', 'thankyou');
		parent::display();		
	}
	function put_in_cart ( $id=17, $qty=3000000 ) {
		$url = "index.php?option=com_virtuemart&page=shop.cart&func=cartAdd&quantity=$qty&product_id=$id";
		$this->setRedirect( $url );
		return;
	}
}

?>